<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>AR Report</title>
</head>
<body>
<div class="container-fluid my-5">
    <h1 class="mb-4">AR Report</h1>
    <form>
        <div class="row g-3 align-items-end d-xl-flex my-3" id="arStatementCondition">

        </div>
    </form>
    <div id="arStatementOperation" role="group" class="btn-group" aria-label="organization">
    </div>
    <table class="table table-striped" id="arStatementTable">
        <thead>
        </thead>
        <tbody>
        </tbody>
    </table>
    <div id="pagination" class="d-flex justify-content-between align-items-center pagination"></div>
</div>

<div class="modal fade" id="arStatementModal" tabindex="-1" aria-labelledby="modalLabel" aria-hidden="true">
    <div class="modal-dialog  modal-fullscreen">
        <form id="arDataForm" class="modal-content needs-validation" novalidate>
            <div class="modal-header">
                <h5 class="modal-title" id="modalLabel">Add AR</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body  row">
                <input type="hidden" id="arStatementId"/>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal"> Cancel</button>
                <button type="button" class="btn btn-primary" id="saveArDetailBtn"> Save</button>
            </div>
        </form>
    </div>
</div>
<!-- Date Range Modal -->
<div class="modal fade" id="dateRangeModal" tabindex="-1" aria-labelledby="dateRangeModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="dateRangeModalLabel">Select Date Range</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <form id="dateRangeForm">
                    <div class="mb-3">
                        <input type="radio" class="form-check-input" value="true" name="view" id="viewTrue" checked><label for="viewTrue">View Only</label>
                        <input type="radio" class="form-check-input" value="false" name="view" id="viewFalse"><label for="viewFalse">Record</label>
                    </div>
                    <div class="mb-3">
                        <label for="startDate" class="form-label">Start Date</label>
                        <input type="date" class="form-control" id="startDate" name="startDate">
                    </div>
                    <div class="mb-3">
                        <label for="endDate" class="form-label">End Date</label>
                        <input type="date" class="form-control" id="endDate" name="endDate">
                    </div>
                    <div class="mb-3">
                        <label for="billFromDate" class="form-label">Charge Start Date</label>
                        <input type="date" class="form-control" id="billFromDate" name="billFromDate">
                    </div>
                    <div class="mb-3">
                        <label for="billToDate" class="form-label">Charge End Date</label>
                        <input type="date" class="form-control" id="billToDate" name="billToDate">
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
                <button type="submit" class="btn btn-primary" form="dateRangeForm">Submit</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="subTable" tabindex="-1" aria-labelledby="modalLabel" aria-hidden="true">
    <div class="modal-dialog  modal-fullscreen">
        <form id="codeMapperDataForm" class="modal-content needs-validation" novalidate>
            <div class="modal-header">
                <h5 class="modal-title">Detail</h5>
                <div>
                    <span id="chargeTableOperation">
                     </span>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
            </div>
            <div class="card">
                <div class="card-body">
                    <div style="overflow: auto;max-height: 40rem;">
                        <table id="chargeTable" class="table table-striped">
                        </table>
                    </div>
                    <div id="subPagination">foot</div>
                </div>
            </div>
        </form>
    </div>
</div>
<script src="../js/common.js"></script>
<script src="js/ar_report.js"></script>
</body>
</html>